package com.pkx.cloud.fse7.dms.splitgrant.controller;

import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.*;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.pkx.cloud.fse7.dms.splitgrant.entity.RpDmsTokenSplitGrantView;
import com.pkx.cloud.fse7.dms.splitgrant.service.RpDmsTokenSplitGrantViewService;
import com.pkx.cloud.whzx.comn.ORpose;

import java.text.ParseException;
import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;

/**
 *  控制器
 *
 * @author zhangwh
 * @since 2020-10-15
 */
@RestController
@RequestMapping("/splitgrant/rp-dms-token-split-grant-view")
@Api(value = "分体式门禁授权报表", tags = "分体式门禁授权报表")
@Slf4j
@ORpose
public class RpDmsTokenSplitGrantViewController {

    @Autowired
    private RpDmsTokenSplitGrantViewService rpDmsTokenSplitGrantViewService;

    @ApiOperation("分体式门禁授权分页列表")
    @GetMapping("/page")
    public Page<RpDmsTokenSplitGrantView> page(Page page, String startIssueDate,String endIssueDate,String staffName,String tokenId) throws ParseException {
        return rpDmsTokenSplitGrantViewService.pageList(page,startIssueDate,endIssueDate,staffName,tokenId);
    }

    @ApiOperation("分体式门禁授权列表")
    @GetMapping("/list")
    public List<RpDmsTokenSplitGrantView> list(RpDmsTokenSplitGrantView rpDmsTokenSplitGrantView) {
        return rpDmsTokenSplitGrantViewService.listByEntity(rpDmsTokenSplitGrantView);
    }
}
